<?php

class WSignupForm extends CWidget{
    public $action = '';

    public function init() {

        parent::init();

        //set default action

        if($this->action == ''){
            $this->action = url('/site/login');
        }
        //register js

//        $cs = Yii::app()->clientScript;
//
//        $cs->registerCoreScript('jquery');

        //$cs->registerScriptFile(Yii::app()->assetManager->publish(Yii::getPathOfAlias('application.widgets.newsletter.assets'). DIRECTORY_SEPARATOR. 'newsletter.js'), CClientScript::POS_END);

    }



    public function run() {

        //load model

        $model = new User('insert');

        $this->render('form', array(

            'model' => $model

        ));

    }

}